package com.genius.reservation.receiver.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.genius.reservation.car.entity.ReservationStartCarInformation;
import com.genius.reservation.common.ResponseRule;
import com.genius.reservation.common.rabbitmq.RabbitMessageEntity;
import com.genius.reservation.receiver.entity.ReceiverInformation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.genius.reservation.reservation.entity.ReservationInformation;
import com.genius.reservation.user.entity.UserInformation;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author baomidou
 * @since 2022-05-26
 */
public interface IReceiverInformationService extends IService<ReceiverInformation> {

    default LambdaQueryWrapper<ReceiverInformation> getWrapper(){
        return new LambdaQueryWrapper();
    }

    ReceiverInformation createReceiver(UserInformation user);

    default ReceiverInformation addAndUp(ReceiverInformation receiver){
        this.saveOrUpdate(receiver);
        return receiver;
    }

//    void newMessage(RabbitMessageEntity obj);
//
//    ResponseRule getMessage(String receiveManagerNumber);
//
//    ResponseRule getAllMessage(String receiverNumber);

    //TODO 2022/6/22 下班  做到了收货员获取到到货信息，   然后接下来要做去到月台开始收货，

    ResponseRule startReceive(String reservationNumber, String carCode,String receiverNumber);


    ResponseRule finishReceive(String reservationNumber,String receiverNumber,String receiveRecordNumber);



    ResponseRule getInspectItem(String reservationNumber);

    ResponseRule inspectSuccess(String reservationNumber,String receiverNumber,Integer inspectNumber);
    ResponseRule delInspect(String reservationNumber,String receiverNumber,Integer inspectNumber);

    ResponseRule getAllInspectByReservation(String reservationNumber,String receiverNumber);
    ReceiverInformation getReceiverByReceiverNumber(String receiverNumber);
    ResponseRule getStatistical(String receiverNumber);

    public ResponseRule findStartCarByReceiver(String receiverNumber) ;

    public ResponseRule receiverHoliday(String receiverNumber) ;

    public ResponseRule receiverWork(String receiverNumber) ;

}
